package com.ruoyi.basedata.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseDO;
import lombok.*;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author *
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName("t_collector")
public class Collector extends BaseDO {

    private static final long serialVersionUID = 1709350608971216447L;
    @TableId
    private Long id;

    /**
     * 设备归属水司
     */
    @TableField("tenant_id")
    private String tenantId;


    /**
     * 集中器id
     */
    @TableField("concentrator_id")
    @NotNull(message = "集中器id不能为空")
    @Excel(name = "集中器ID", type = Excel.Type.ALL, sort = 1)
    private Long concentratorId;

    /**
     * 集中器名称
     */
    @Excel(name = "集中器名称", type = Excel.Type.EXPORT, sort = 2)
    @TableField(exist = false)
    private String concentratorName;

    /**
     * 集中器地址
     */
    @Excel(name = "集中器地址", type = Excel.Type.EXPORT, sort = 3)
    @TableField(exist = false)
    private String concentratorAddress;

    /**
     * 采集器名称
     */
    @Excel(name = "采集器名称", type = Excel.Type.ALL, sort = 4)
    @TableField("collector_name")
    private String collectorName;

    /**
     * 采集器地址
     */
    @Excel(name = "采集器地址", type = Excel.Type.ALL, sort = 5)
    @TableField("collector_add")
    private String collectorAdd;

    /**
     * 采集器序号
     */
    @Excel(name = "采集器序号", type = Excel.Type.ALL, sort = 6)
    @TableField("collector_no")
    private String collectorNo;

    /**
     * 供电类型
     */
    @Excel(name = "供电类型", type = Excel.Type.ALL, sort = 7)
    @TableField("electric_type")
    private String electricType;

    /**
     * 边界值
     */
    @Excel(name = "边界值", type = Excel.Type.ALL, sort = 8)
    @TableField("boundary_value")
    private Integer boundaryValue;

    /**
     * 通讯方式多选，无线、中继、下载表类型
     */
    @Excel(name = "通讯方式", type = Excel.Type.ALL, sort = 9)
    @TableField("communication_mode")
    private String communicationMode;

    /**
     * 是否多通道采集器
     */
    @Excel(name = "多通道采集器", type = Excel.Type.ALL, sort = 10)
    @TableField("multi_pass")
    private String multiPass;

    /**
     * 抄表频率(分钟)
     */
    @Excel(name = "抄表频率", type = Excel.Type.ALL, sort = 11)
    @TableField("reading_frequency")
    private Integer readingFrequency;

    /**
     * 备注
     */
    @Excel(name = "备注", type = Excel.Type.ALL, sort = 12)
    @TableField("remark")
    private String remark;
    /**
     * 删除标志（0代表存在 2代表删除）
     */
    @TableField("del_flag")
    @TableLogic(value = "0", delval = "2")
    private Integer delFlag;
}
